package day09.Map.TreeMap;

import java.util.Map;
import java.util.Set;
import java.util.TreeMap;

public class Text {
    public static void main(String[] args) {
        TreeMap<Student,String>tm=new TreeMap<>();
        Student s1=new Student("xiaohei",23);
        Student s2=new Student("dagou",22);
        Student s3=new Student("ergou",22);
        tm.put(s1,"江苏");
        tm.put(s2,"南京");
        tm.put(s3,"驻马店");
       tm.forEach((Student key,String value)->{
           System.out.println(key+"---"+value);
       });
    }
}
